#include <stdlib.h>
#include <stdio.h>
#include <assert.h>
#include <string.h>
#include "PION.h"


PION* piCreer_Pion()
{
    PION* pi=(PION*) malloc(sizeof(PION));
    pi->jo = joCreer_Joueur();
    strcpy (pi->nom, "");
    pi->x_dep1 = 2;
    pi->y_dep1 = 1;
    pi->x_dep2 = 2;
    pi->y_dep2 = 1;
    pi->x_dep3 = 2;
    pi->y_dep3 = 1;
    pi->x_dep4 = 2;
    pi->y_dep4 = 1;
    pi->numcase=1;
    return pi;
}

void piLibere_Pion(PION *pi)
{
    free (pi);
}

void piTest_Pion()
{
    PION *pi;
    pi = piCreer_Pion();
    printf("Tests du module pion : \n\n") ;
    /* Début du test de piCreer_Pion*/
    printf("Test de piCreer_Pion ... \n") ;
    assert(pi->numcase == 1);
    assert(strcmp(pi->nom, "")==0);

    free(pi);

    printf("Tests du module Pion terminé \n\n") ;
}
